# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-ovos-ocp-news-plugin
pkgver=0.0.3
pkgrel=0
pkgdesc="ovos-core news plugin"
url="https://github.com/OpenVoiceOS/ovos-ocp-news-plugin"
arch="noarch"
license="Apache-2.0"
depends="
	py3-beautifulsoup4
	py3-ovos-ocp-audio-plugin
	py3-ovos-ocp-m3u-plugin
	py3-ovos-ocp-rss-plugin
	py3-tz
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenVoiceOS/ovos-ocp-news-plugin/archive/refs/tags/V$pkgver.tar.gz"
builddir="$srcdir/ovos-ocp-news-plugin-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
36f0c6fa081e6aec492e324032f0f3fb372e556c074c4241dd4c36a8acd133641f9f33d44f54ad12fb5e595c749989969cc129ccbffd81690a69e6319e026fbe  py3-ovos-ocp-news-plugin-0.0.3.tar.gz
"
